package com.ruoyi.pack.mapper;

import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.pack.domain.PackProjectWarehouseOperation;

/**
 * 项目仓库操作权限Mapper接口
 * 
 * @author ruoyi
 */
@Mapper
public interface PackProjectWarehouseOperationMapper 
{
    /**
     * 查询项目仓库操作权限
     * 
     * @param projectWarehouseId 项目仓库操作权限主键
     * @return 项目仓库操作权限
     */
    public PackProjectWarehouseOperation selectPackProjectWarehouseOperationByProjectWarehouseId(Long projectWarehouseId);

    /**
     * 查询项目仓库操作权限列表
     * 
     * @param packProjectWarehouseOperation 项目仓库操作权限
     * @return 项目仓库操作权限集合
     */
    public List<PackProjectWarehouseOperation> selectPackProjectWarehouseOperationList(PackProjectWarehouseOperation packProjectWarehouseOperation);

    /**
     * 查询项目仓库操作权限列表（用于导出，包含关联名称信息）
     * 
     * @param packProjectWarehouseOperation 项目仓库操作权限
     * @return 项目仓库操作权限集合
     */
    public List<PackProjectWarehouseOperation> selectPackProjectWarehouseOperationListForExport(PackProjectWarehouseOperation packProjectWarehouseOperation);

    /**
     * 新增项目仓库操作权限
     * 
     * @param packProjectWarehouseOperation 项目仓库操作权限
     * @return 结果
     */
    public int insertPackProjectWarehouseOperation(PackProjectWarehouseOperation packProjectWarehouseOperation);

    /**
     * 修改项目仓库操作权限
     * 
     * @param packProjectWarehouseOperation 项目仓库操作权限
     * @return 结果
     */
    public int updatePackProjectWarehouseOperation(PackProjectWarehouseOperation packProjectWarehouseOperation);

    /**
     * 删除项目仓库操作权限
     * 
     * @param projectWarehouseId 项目仓库操作权限主键
     * @return 结果
     */
    public int deletePackProjectWarehouseOperationByProjectWarehouseId(Long projectWarehouseId);

    /**
     * 批量删除项目仓库操作权限
     * 
     * @param projectWarehouseIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deletePackProjectWarehouseOperationByProjectWarehouseIds(Long[] projectWarehouseIds);

    /**
     * 根据项目ID查询项目仓库操作权限列表
     * 
     * @param projectId 项目ID
     * @return 项目仓库操作权限集合
     */
    public List<PackProjectWarehouseOperation> selectPackProjectWarehouseOperationByProjectId(Long projectId);

    /**
     * 根据项目ID删除项目仓库操作权限
     * 
     * @param projectId 项目ID
     * @return 结果
     */
    public int deletePackProjectWarehouseOperationByProjectId(Long projectId);

    /**
     * 根据项目ID和仓库ID查询项目仓库操作权限
     * 
     * @param projectId 项目ID
     * @param warehouseId 仓库ID
     * @return 项目仓库操作权限
     */
    public PackProjectWarehouseOperation selectPackProjectWarehouseOperationByProjectAndWarehouse(@Param("projectId") Long projectId, @Param("warehouseId") Long warehouseId);

    /**
     * 检查项目仓库权限是否存在
     * 
     * @param projectId 项目ID
     * @param warehouseId 仓库ID
     * @return 结果
     */
    public PackProjectWarehouseOperation checkProjectWarehouseExists(@Param("projectId") Long projectId, @Param("warehouseId") Long warehouseId);

    /**
     * 根据仓库ID查询相关的项目权限配置
     * 
     * @param warehouseId 仓库ID
     * @return 项目仓库操作权限集合
     */
    public List<PackProjectWarehouseOperation> selectPackProjectWarehouseOperationByWarehouseId(Long warehouseId);
} 